Inheritance diagram for TMCRealRect:

Public Member Functions | |
| TMCRealRect (void) | |
| TMCRealRect (const real l, const real t, const real r, const real b) | |
| real | L (void) const |
| real | T (void) const |
| real | R (void) const |
| real | B (void) const |
| void | CenterInside (const TMCRealRect &inRect) |
| boolean | EqualDimensions (const TMCRealRect &inRect) const |
| boolean | Empty (void) const |
| boolean | Invalid (void) const |
| boolean | Equal (const TMCRealRect &inRect) const |
| real | GetWidth (void) const |
| real | GetHeight (void) const |
| TVector2 | GetCenter (void) const |
| real | GetArea (void) const |
| void | Inset (const real dx, const real dy) |
| boolean | Intersect (const TMCRealRect &inRect, const boolean inSetEmpty=1) |
| void | Offset (const real dx, const real dy) |
| void | Proportion (const TMCRealRect &inRect) |
| void | PtToRect (const TVector2 &pt1, const TVector2 &pt2) |
| boolean | PtInside (const TVector2 &inPt) const |
| TVector2 | PinPoint (const TVector2 &inPt) const |
| boolean | RectInside (const TMCRealRect &inRect) const |
| boolean | RectInRect (const TMCRealRect &inRect) const |
| void | Scale (const float inScale) |
| void | Set (const real l, const real t, const real r, const real b) |
| void | SetEmpty (void) |
| void | SetInvalid (void) |
| void | Union (const TMCRealRect &inRect) |
| void | UnionPt (const TVector2 &inPt) |
| void | ConvertIntToFloat (const TMCRect &inIntegerRect) |
| void | ConvertFromIntRect (const TMCRect &inIntegerRect) |
| void | InitIntFromFloat (TMCRect &inIntegerRect) |
| boolean | operator== (const TMCRealRect &rr) const |
| boolean | operator!= (const TMCRealRect &rr) const |
| TMCRealRect & | operator= (const int32 i) |
Static Public Attributes | |
| static const TMCRealRect | kZero |
| (0, 0, 0, 0); | |
| static const TMCRealRect | kEmpty |
| (0, 0, 0, 0); | |
| static const TMCRealRect | kInvalid |
| (FLT_MAX, FLT_MAX, FLT_MIN, FLT_MIN); | |
|
|
|
|
||||||||||||||||||||
|
|
|
|
|
|
|
Positions "centerRect" at the center of srcRect. |
|
|
Convert the passed in integer rect to an floating point rect. |
|
|
NOTE: This function is going away please use ConvertFromIntRect() Convert the passed in integer rect to an floating point rect. |
|
|
Return TRUE if the rectangle has no width or height. |
|
|
Compare the components of the two rectangles and return TRUE if they are all the same. |
|
|
Compare the components of the two rectangles and return TRUE if they are the same width and height. |
|
|
Calculate and return the area of the rectangle. |
|
|
Calculate and return the center of the rectangle. |
|
|
Calculate and return the height of the rectangle. May return a negative width. |
|
|
Calculate and return the width of the rectangle. May return a negative width. |
|
|
Fill out the passed in integer rect according to this floating point rect. |
|
||||||||||||
|
InsetRect shrinks or expands the rectangle. The left and right sides are moved by dx; the top and bottom sides are moved by dy. Note: The rectangle is not set to an empty rect (0,0,0,0) if the resulting width or height is less than zero. |
|
||||||||||||
|
Intersect calculates the rectangle that is the intersection of "this" and the input rectangle, and returns TRUE if they indeed intersect or FALSE if they do not. If the rectangles do not intersect, the rect is set either empty or invalid based on the "inSetEmpty" flag. |
|
|
Return TRUE if either the horizontal or vertical bounds are invalid |
|
|
|
|
||||||||||||
|
Offset moves the rectangle by adding dx to the horizontal coordinates, and adding dy to the vertical coordinates. |
|
|
|
|
|
|
|
|
|
|
|
Pin the passed in point to within the rectangle and return the resulting point. |
|
|
Proportionally map src rect into dst. Warning: zero width or zero height rects are dangerous. |
|
|
PtInside determines whether a point is enclosed within the specified rectangle, and returns TRUE if so and FALSE if not. |
|
||||||||||||
|
PtToRect returns the smallest rectangle which encloses the two input points. |
|
|
|
|
|
Note: similar to above, but ignores empty rects. This routine interprets rectangles in the same way that QD does. A rectangle will hit if any of the bits in the bitmap it encloses overlap with any of the bits in the bitmap enclosed by the other rectangle. |
|
|
RectInside determines whether a rectangle is enclosed within a second rectangle, and returns TRUE if so and FALSE if not. |
|
|
Scales each term. |
|
||||||||||||||||||||
|
Set assigns the four boundary coordinates to a rectangle. The result is a rectangle with coordinates (left,top,right,bottom). |
|
|
Set the rectangle to no width or height. |
|
|
Set the rectangle to have negative width or height. This is useful for initializing a rectangle to be the union of a set of rectangles |
|
|
|
|
|
Union calculates the smallest rectangle which encloses both input rectangles. |
|
|
UnionPt expands the input rectangle to enclose the input point. If the point is already within the rectangle, nothing is changed. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(0, 0, 0, 0);
|
|
|
(FLT_MAX, FLT_MAX, FLT_MIN, FLT_MIN);
|
|
|
(0, 0, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.5